
pkgname=apr
pkgver=1.6.3
pkgrel=1
pkgdesc="The Apache Portable Runtime"
arch=('x86_64')
url="https://apr.apache.org/"
depends=('util-linux')
options=('!libtool')
license=('APACHE')
source=("https://www.apache.org/dist/apr/apr-${pkgver}.tar.bz2")
sha256sums=('131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172')

build() {
  cd apr-${pkgver}

  ./configure --prefix=/usr \
    --includedir=/usr/include/apr-1 \
    --with-installbuilddir=/usr/share/apr-1/build \
    --enable-nonportable-atomics \
    --with-devrandom=/dev/urandom \
    --disable-static
  make
}

check() {
  cd apr-${pkgver}
  
  make -j1 check
}

package() {
  cd apr-${pkgver}
  
  make DESTDIR=${pkgdir} install
}
